"""
    反序列化：yaml转python
"""
import yaml

with open("data.yaml", encoding="UTF-8") as f:
    s_yaml = f.read()
    print(s_yaml)
# 从文件读取出来的都是字符串类型
# 字符串转yaml
d_yaml = yaml.safe_load(s_yaml)
print(d_yaml)
print(type(d_yaml))  # <class 'dict'>
